package com.example.demo.kafkaListener;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;

public class Listener {




    @KafkaListener(topicPattern = "sys.AP.thing.deviceinfo.register.request")
    public void lis(ConsumerRecord<String,String> record){
        JSONObject msg = (JSONObject) JSON.parse(record.value());
        System.out.println(msg);
    }
}
